Skip to main content

TsgDXFExport

Unit: DXFExport

Description

The TsgDXFExport class provides API for export yours vector graphics files to DXF files.

Learn more about DXF

DXF is an acronym for Drawing eXchange Format. DXF is a widely used file format for exchanging 2D and 3D CAD data. It's not an open format but owned by AutoDesk Inc. who used it for their program AutoCAD. With every new version of AutoCAD the definition of DXF is changed but nevertheless there are many of programs which are capable of reading and writing some form of DXF. DXF is an ASCII replication of the contents of a drawing file enabling the interchange of files from one CAD system to another program. DXF import/export is supported by a wide variety of applications, ranging from CAD products to word processors, desktop publishing and illustration tools. The DXF CAD format has become the de facto standard in PC based CAD industry with many other CAD systems able to read and write this format too.

DXF Exporter allows programmers to create DXF files as easy as possible. All you need is to draw image using Windows GDI functions onto DXF Exporter’s DC or make a metafile and give it to the Exporter. DXF Exporter reads Windows Metafile structure and makes DXF file automatically.

For specifying of AutoCAD version use AutoCADVer property.

Properties

PropertiesDescriptions
AutoCADVerThe property defines using DXF-file format.
BlockThe property returns the name of the BLOCK that is currently being filled with entities.
CanvasThe property points to the TCanvas object which can be used for drawing with the standard TCanvas methods.
CurrentLayerThe property obtains current layer.
DefaultHatchPatternScaleThe property sets and gets DefaultHatchPatternScale.
DefaultLTypeScaleThe property sets and gets DefaultLTypeScale.
IsParseWhiteThe property sets if white rectangles hide entities (parts of entities) lying under them.
LayersThe property sets and gets the list of layers.
MillimetersThe property sets and gets measurement system.
OffsetThe property sets and gets the hatch pattern line offset.
PenWidthRatioThe property sets and gets pen’s width ratio.
UndefinedInsertsThe property returns a list of undefined INSERT entities.
UnitSizeThe property defines scale factor for unit size.
Use01MMThe property sets if loading coordinates are divided by 100.
UseMetafileRatioThe property defines whether the ratio between height and width of metafile should be used.
UseUnicodeThe property can be used for correct displaying Unicode fonts.

Methods

MethodsDescriptions
AddArcThe method adds the arc.
AddCircleThe method adds the circle
AddDimensionThe method adds the dimension.
AddEllipseThe method adds the ellipse.
AddHatchThe method adds the hatch.
AddLeaderThe method adds the leader.
AddLineThe method adds the line.
AddLTypeThe method adds the linetype.
AddMTextThe method adds the Mtext.
AddPixelThe method adds the pixel.
AddPolyBezierThe methods adds the polybezier.
AddPolyLineThe method adds the polyline.
AddRectangleThe method adds the rectangle.
AddSolidThe method adds the solid.
AddTextThe method adds the text.
AddXrefThe method adds the xref.
BeginBlockThe method creates the block.
ClearThe method destroys all entities in the instance.
CreateCreates an instance of the TsgDXFExport class.
DestroyDestroys an instance of the TsgDXFExport class.
EndBlockThe method closes the block.
EndDrawThe method finished the drawing.
InsertThe method creates and adds the insert entity.
LoadFromFileThe method loads data from Windows metafile.
LoadFromMetafileThe method loads data from TMetafile type instance.
SaveToFileThe method saves the current data to DXF-file.
SaveToStreamThe method saves the current data to specified stream in DXF text format.
SetLayerByStringThe method sets current layer.